<div class="bg-light lter b-b wrapper-md">
  <h1 class="m-n font-thin h3">电子票游客信息</h1>
</div>
<div class="panel panel-default">
  <div class="panel-body">
    <div class="col-lg-2-4">
      <div class="input-group" >
        <div class="input-group-btn" >
          <span class="btn btn-default">姓名</span>
        </div>
        <input type="text" class="form-control" ng-model="searchform.name">
      </div>
    </div>
    <div class="col-lg-2-4">
      <div class="input-group" >
        <div class="input-group-btn" >
          <span class="btn btn-default">证件号</span>
        </div>
        <input type="text" class="form-control" ng-model="searchform.card_no">
      </div>
    </div>
    <div class="col-lg-2-4">
      <div class="pull-left input-group" ng-click="dateOpen($event, searchform.date)">
        <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="searchform.date.lable"
          is-open="searchform.date.opened" readonly close-text="关闭" current-text="今天" clear-text="清除"
          ng-required="true"/>
        <span class="input-group-btn">
          <button type="button" class="btn btn-default">
            <i class="glyphicon glyphicon-calendar"></i>
          </button>
        </span>
      </div>
    </div>
    <div class="col-lg-2 text-center">
      <h4 class="control-label">共 {{totalItems || 0}} 人</h4>
    </div>
    <div class="col-lg-2 pull-right">
      <button class="btn btn-success" ng-click="search()">立即搜索</button>
    </div>
  </div>

  <div class="panel-body">

    <!-- 网络太差, 画圈等 -->
    <h3 class="col-sm-12 text-center" ng-show="searchform.loading">
      <i class="fa fa-spin fa-spinner hide show inline"/>
    </h3>

    <div ng-show="!searchform.loading">
      <h3 class="col-sm-12 text-center" ng-show="touristList.length == 0">今日无招徕游客</h3>

      <table class="table table-striped table-bordered" ng-show="touristList.length != 0">
        <thead>
          <tr>
            <th class="col-md-1 text-center">姓名</th>
            <th class="col-md-1 text-center">电话</th>
            <th class="col-md-1 text-center">证件类型</th>
            <th class="col-md-1 text-center">证件号</th>
            <th class="col-md-2 text-center">地址</th>
            <th class="col-md-1 text-center">信息查询</th>
          </tr>
        </thead>
        <tbody>
          <tr ng-repeat="info in touristList">
            <td class="text-center">{{info.name}}</td>
            <td class="text-center">{{info.mobile}}</td>
            <td class="text-center">{{info.card_type=='1'?'身份证':'护照'}}</td>
            <td class="text-center">{{info.card_type=='1'?info.card_no:info.passport_code}}</td>
            <td>{{info.address}}</td>
            <td class="text-center">
              <button type="button" class="btn btn-info btn-xs" ng-click="getInfo(info)">出游信息</button>
            </td>
          </tr>
        </tbody>
      </table>
      <div class="text-right" ng-show="touristList.length != 0">
        <pagination total-items="totalItems" ng-model="currentPage" ng-change="search()" 
         previous-text="上一页" max-size="5" next-text="下一页" first-text="首页" last-text="尾页" 
         boundary-links="true" rotate="false" items-per-page="itemsPerPage">
        </pagination>
      </div>
    </div>

  </div>
</div>
